//
//  YMSPictureCell.swift
//  YMSWeibo
//
//  Created by 杨茂盛 on 2016/11/17.
//  Copyright © 2016年 杨茂盛. All rights reserved.
//

import UIKit
import SDWebImage
class YMSPictureCell: UICollectionViewCell {

    @IBOutlet weak var imageView: UIImageView!
    @IBOutlet weak var gifImage: UIImageView!
    
    var pictureInfo:YMSPicture?{
        
        didSet{
            //设置url
            //let url = URL(string: pictureInfo?.wap360 ?? "")
            imageView.sd_setImage(with: pictureInfo?.imageUrl)
            //设置gif标志是否显示
            self.gifImage.isHidden = !pictureInfo!.thumbnail_pic!.hasSuffix(".gif")
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
    }
}
